/* GUI CONVERTED from adadcgc.p (converter v1.76) Mon Apr 21 19:43:26 2003 */
/* adadcgc.p - ADDRESS CODE CHANGE -SUBPROGRAM                          */
/* Copyright 1986-2003 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */

/* $Revision: 1.8.1.7 $                                                         */

/* REVISION: 7.3       CREATED: 05/28/93  BY: MPP *GB39*                */
/* REVISION: 7.3      MODIFIED: 06/29/93  BY: cdt *GC79*                */
/* REVISION: 7.3      MODIFIED: 01/27/94  BY: dpm *FL63*                */
/*                              09/26/94  BY: jzs *GM54*                */
/* REVISION: 8.5      MODIFIED: 01/31/96  BY: *J0CV* Robert Wachowicz   */
/* REVISION: 8.5      MODIFIED: 04/30/96  BY: ajw *J0KT*                */
/* REVISION: 8.5      MODIFIED: 11/19/96  BY: *H0PD* Aruna Patil        */
/* REVISION: 8.5      MODIFIED: 03/04/97  BY: *H0T5* Ajit Deodhar       */
/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan   */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan   */
/* REVISION: 9.0      LAST MODIFIED: 03/10/99   BY: *M0B3* Michael Amaladhas */
/* REVISION: 9.0      LAST MODIFIED: 03/13/99   BY: *M0BD* Alfred Tan        */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/11/00 BY: *N0KK* jyn                 */
/* REVISION: 9.1      LAST MODIFIED: 02/06/01   BY: *N0VG* Jyoti Thatte      */
/* Old ECO marker removed, but no ECO header exists *F0PN*               */
/* Revision: 1.8.1.6     BY: Russ Witt       DATE: 06/01/01 ECO: *P00J*       */
/* $Revision: 1.8.1.7 $    BY: Narathip W.      DATE: 04/17/03 ECO: *P0Q4*      */

/*V8:ConvertMode=Maintenance                                            */

/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

{mfdeclre.i}

{gplabel.i} /* EXTERNAL LABEL INCLUDE */
{cxcustom.i "ADADCGC.P"}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE adadcgc_p_1 "Records Updated"
/* MaxLen: Comment: */

&SCOPED-DEFINE adadcgc_p_2 "Data Set"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

{gpfilev.i}

define shared variable addr1 like ad_addr.
define shared variable addr2 like ad_addr.
define shared variable i as integer no-undo.
define shared variable num_rec as integer no-undo.
define shared variable cnt_clear like mfc_logical. /* mfcscgb.i */
define shared variable record_id as recid no-undo.
define shared frame b.
define variable jk as integer.
define shared variable type1 like ad_type.

do with frame b:
   {&ADADCGC-P-TAG1}
   FORM /*GUI*/ 
      file_desc    label {&adadcgc_p_2} format "x(30)"
      num_rec      label {&adadcgc_p_1}
   with frame b width 80 down no-attr-space THREE-D /*GUI*/.

   {&ADADCGC-P-TAG2}

   /* SET EXTERNAL LABELS */
   setFrameLabels(frame b:handle).

   {mfcscg.i sph_hist sph_slspsn1 addr1 addr2}
   {mfcscg.i cmh_hist cmh_cust addr1 addr2}

   {adadcg3.i cph_hist addr1 addr2 cph_cust cph_ship cph_ship " " }

   {mfcscg.i cm_mstr cm_addr addr1 addr2}
   {mfcscg.i vd_mstr vd_addr addr1 addr2}
   {mfcscg.i ers_mstr ers_vend addr1 addr2}
   {mfcscg.i locc_det locc_addr addr1 addr2}
   {mfcscg.i sp_mstr sp_addr addr1 addr2}
   {mfcscg.i spd_det spd_addr addr1 addr2}
   {mfcscg.i ls_mstr ls_mstr.ls_addr addr1 addr2}

   {adadcg3.i eu_mstr addr1 addr2 eu_addr eu_cm_nbr eu_cm_nbr " " }
   {mfcscg.i eud_det eud_addr   addr1 addr2}
   {mfcscg.i cd_det  cd_ref addr1 addr2}
   {mfcscg.i ieh_hist ieh_declarant addr1 addr2} /* intrastat*/
   {mfcscg.i csid_det csid_addr1 addr1 addr2} /* intrastat records */
   {mfcscg.i csid_det csid_addr2 addr1 addr2} /* intrastat records */
   {mfcscg.i csid_det csid_addr3 addr1 addr2} /* intrastat records */

   /* CLEANING UP OLD INVALID RECORDS */
   for each csbd_det exclusive-lock where csbd_addr = addr2:
      delete csbd_det.
   end. /* for each csbd_det */

   {mfcscg.i csbd_det csbd_addr  addr1 addr2} /* Bank Detail */

end.
